package ldkxingzhe.l365calendar.utils;

import android.util.Log;

/**
 * 日志系统
 */
public class LogUtil {
    private static final int LOG_LEVEL = Log.VERBOSE;

    public static void v(final String tag, final String message){
        if(isNeedLog(Log.VERBOSE)){
            Log.v(tag, message);
        }
    }

    public static void e(final String tag, final String message){
        if(isNeedLog(Log.ERROR)){
            Log.e(tag, message);
        }
    }

    public static void d(final String tag, final String message){
        if(isNeedLog(Log.DEBUG)){
            Log.d(tag, message);
        }
    }

    private static boolean isNeedLog(int logLevel){
        if(LOG_LEVEL >= logLevel){
            return true;
        }
        return false;
    }
}
